package top.kpromise.user.service;

import top.kpromise.user.model.response.UserModel;

public interface UserService {

    UserModel findUserByPhone(String phone);

    UserModel findUserById(String id);

    UserModel findUserByEmail(String email);

    UserModel findUserByLoginValue(String loginValue);

    int getUserCountByPhone(String phone);

    int getUserCountByEmail(String email);

    int getUserCountById(String id);

    int insert(String id, String phone, String email);

    void updateEnableByUserId(String userId, int enabled);

    void sendCreateUserCode(String loginValue);

    void sendChangeLoginValueCode(String receiver, String code);

    void sendBindNewLoginValueCode(String phone, String code);

    void sendResetPasswordCode(String loginValue, String code);

    void updateLoginValue(String userId, String newLoginValue);
}
